import { BaseService } from '@/base/base.service';
import { Injectable } from '@nestjs/common';

@Injectable()
export class HomeService {

  constructor(private readonly baseService: BaseService){}


  async getHomeData() {
    const channelCount = await this.baseService.personalChannel.count()
    const clueCount = await this.baseService.newCarClue.count()
    const peerCount = await this.baseService.peerCar.count()
    const userCount = await this.baseService.wxUser.count()
    let data = {
      channelCount: channelCount,
      clueCount: clueCount,
      peerCount: peerCount,
      userCount: userCount
    }
    return data
  }
}
